package com.supreme.simpleserver.component;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

@Component
public class SimpleApplicationContext implements ApplicationContextAware {

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        System.out.println("==== SimpleApplicationContext ====");
        if (applicationContext.containsBean("sqlSessionFactory")) {
            System.out.println("Bean => sqlSessionFactory");
        }
    }
}
